package com.yyq.servlets;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.Transaction;

import com.yyq.sos.util.SessionFactoryUtil;

public class Init_Servlet extends HttpServlet {

	@Override
	public void init() throws ServletException {
		Session session=SessionFactoryUtil.getInstance().getSession();
		Transaction transaction=session.beginTransaction();
		String sql="delete from ss_sys_online_users ";
		SQLQuery query=session.createSQLQuery(sql);
		query.executeUpdate();
		transaction.commit();
		session.close(); 
System.out.println("delete ss_sys_online_users.........");
	}
  
}
